<template>
   <div class="block">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="page"
      :page-sizes="pageSizes"
      :page-size="pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total">
    </el-pagination>
  </div>
</template>

<script>
  export default {
     props:{
    page:{
      default(){return 1},
      type:Number
    },
    pageSize:{
      default(){return 20},
      type:Number
    },
    total:{
      default(){return 0},
      type:Number
    },
    pageSizes:{
      default(){return [20, 40, 60, 80, 100]},
      type:Array()
    },
  },
    methods: {
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
        this.$emit('changepageSize',val)
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${1}`);
        this.$emit('changePage',val)
      }
    },
    data() {
      return {
        
        currentPage4: 1
      };
    }
  }
</script>

<style lang='less' scoped>
.block{
  display: flex;
  justify-content:center;
    background: #ffffff;
    width: 100%;
    padding-top: 12px;
    padding-bottom: 12px;
    margin-right: 20px !important;

}
</style>